package net.pessu.android.shoppoid.init;

import java.text.SimpleDateFormat;

import net.pessu.android.shoppoid.R;
import net.pessu.android.shoppoid.gui.IhmObjets;
import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Typeface;

public class Initialiseur {

	public static void initialiser(Context context) {
		guiInit(context.getAssets());
		IhmObjets.setContext(context);
		formaterInit();
	}

	private static void guiInit(AssetManager mgr) {
		IhmObjets.tf = Typeface.createFromAsset(mgr, "fonts/COUR.TTF");
		IhmObjets.tfTitre = Typeface.createFromAsset(mgr, "fonts/CATHSGBR.TTF");
	}
	
	private static void formaterInit(){
		IhmObjets.sdf = new SimpleDateFormat(IhmObjets.getStringContext(R.string.sdf));
	}
}
